package com.singularity.common.domain.entity;


import java.io.Serializable;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
* 角色权限
* @TableName role_permission
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("role_permission")
public class RolePermission implements Serializable {

    /**
    * 编号
    */
    @TableId(type = IdType.AUTO)
    private Integer id;
    /**
    * 角色id
    */

    private Integer roleId;
    /**
    * 权限id
    */

    private Integer permissionId;
    /**
    * 创建人id
    */

    private Integer creatorId;
    /**
    * 创建时间
    */

    @TableField(fill = FieldFill.INSERT)
    private Date createdAt;
    /**
    * 更新时间
    */

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updatedAt;

    public RolePermission(Integer roleId, Integer permissionId, Integer creatorId) {
        this.roleId = roleId;
        this.permissionId = permissionId;
        this.creatorId = creatorId;
    }
}
